package com.boomkeeper.core.utils;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;

import com.boomkeeper.core.constant.Constant;

public class DateUtils {

	public static String getDefaultDate() {
		return LocalDate.now().toString();
	}
	
	public static String getFormateDate(String pattern) {
		return LocalDate.now().format(DateTimeFormatter.ofPattern(pattern));
	}
	
	public static String parseDateString(Date date, String pattern) {
		return new SimpleDateFormat(pattern).format(date);
	}
	
	public static String parseDateString(Date date) {
		return new SimpleDateFormat(Constant.DATE_FORMATE_3).format(date);
	}
}